package singleton;

public class LazyInnerClassSingleton {

    private LazyInnerClassSingleton() {
    }


    public static final LazyInnerClassSingleton getInstance() {
        // only when function called, inner class will be initialed
        return LazyHolder.LAZY;
    }

    private static class LazyHolder{
        private static final LazyInnerClassSingleton LAZY = new LazyInnerClassSingleton();
    }
}

